#include<stdio.h>
#include<string.h>
int main(void){
    char c[100];
    fgets(c,100,stdin);
    int num=0,cha=0,space=0,other=0;
    for(int i=0;i<strlen(c)-1;i++){
        if(c[i]>='0'&&c[i]<='9'){
            num++;
        }
        else if((c[i]>='a'&&c[i]<='z')||(c[i]>='A'&&c[i]<='Z')){
            cha++;
        }
        else if(c[i]==' '){
            space++;
        }
        else{
            other++;
        }
    }
    printf("number:%d\nchar:%d\nspace:%d\nother:%d\n",num,cha,space,other);
    return 0;
}